package com.yuda.operationcenter.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

//操作状态码及信息提示
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    public static int success = 200;
    public static int failed = 500;
    private String message;
    private int code;
    private int count;

    public Result successOperation(int count){
        this.code = success;
        this.message = "删除成功";
        this.count=count;
        return this;
    }
    public Result failedOperation (){
        this.code = failed;
        this.message = "删除失败";
        return this;
    }
}
